import 'package:flutter/material.dart';
import 'package:flutter_changdian_football/widget/screenutil/custom_screenutil.dart';

// 俱乐部信息
class ClubsInfoWidget extends StatelessWidget {
  const ClubsInfoWidget({super.key});

  @override
  Widget build(BuildContext context) {
    return Stack(
      clipBehavior: Clip.none,
      children: [
        Container(
          margin: EdgeInsets.symmetric(horizontal: 17.w),
          height: 120.w,
          width: double.infinity,
          padding: EdgeInsets.only(bottom: 15.w),
          decoration: BoxDecoration(
            borderRadius: BorderRadius.circular(12.r),
            gradient: const LinearGradient(
              begin: Alignment.topCenter,
              end: Alignment.bottomCenter,
              colors: [
                Color(0xFFD1FFDB),
                Color(0xFFFFFFFF),
                Color(0xFFF4FFF6),
              ],
              stops: [-0.02, 0.54, 1.0],
            ),
            boxShadow: const [
              BoxShadow(
                color: Colors.white,
                offset: Offset(0, 1),
                blurRadius: 0,
                spreadRadius: 0,
              ),
            ],
          ),
          child: SizedBox(
            child: Row(
              crossAxisAlignment: CrossAxisAlignment.end,
              children: [
                Expanded(
                  child: _topAndBottomText(text: '同城排名', value: '0'),
                ),
                Expanded(
                  child: Container(
                    child: _topAndBottomText(text: '球员数', value: '1'),
                  ),
                ),
                Expanded(
                  child: Container(
                    child: _topAndBottomText(text: '活跃度', value: '0'),
                  ),
                )
              ],
            ),
          ),
        ),

        Positioned(
          left: 35.w,
          top: -22.w,
          child: Row(
            crossAxisAlignment: CrossAxisAlignment.end,
            children: [
              Container(
                height: 72.w,
                width: 72.w,
                decoration: BoxDecoration(
                  color: Colors.white,
                  borderRadius: BorderRadius.circular(11),
                  boxShadow: [
                    BoxShadow(
                      color: Colors.grey.withOpacity(0.2), // 阴影颜色
                      spreadRadius: 2, // 阴影扩散范围
                      blurRadius: 3, // 阴影模糊程度
                      offset: const Offset(0, 2), // 阴影偏移量
                    ),
                  ]
                ),
                padding: EdgeInsets.all(2.w),
                child: ClipRRect(
                  borderRadius: BorderRadius.circular(11),
                  child: Container(
                    color: Colors.red,
                  )
                ),
              ),

              SizedBox(width: 12.w,),

              Container(
                padding: EdgeInsets.only(bottom: 12.w),
                child: Text('石子山FFC俱乐部', style: TextStyle(fontSize: 17.sp, color: const Color(0xff222222), fontWeight: FontWeight.bold),),
              )
            ],
          )
        )
      ],
    );
  }

  _topAndBottomText({
    String value = '0',
    String text = ''
  }) {
    return SizedBox(
      child: Column(
        mainAxisSize: MainAxisSize.min,
        children: [
          SizedBox(
            child: Text(value, style: TextStyle(fontSize: 18.sp, color: const Color(0xff499360), fontWeight: FontWeight.w500),),
          ),
          SizedBox(height: 6.w,),
          SizedBox(
            child: Text(text, style: TextStyle(fontSize: 12.sp, color: const Color(0xff666666)),),
          )
        ],
      ),
    );
  }

}